<template>
    <div class="pages">
        <div class="pages_news">
            <Button @click="back" class="buttonReturn">返回</Button>
            <h1 class="pages_news_detail title">{{title}}</h1>
            <div  class="pages_news_detail ql-editor" v-html="content">
            </div>
        </div>
    </div>

</template>

<script>
    import {getNewDetail} from '@/api/moduleIndex.js'
    export default {
        name: "pages_news_detail",
        data(){
            return{
                 content:'',
                title:''
            }
        },
        created(){
            let ID=this.getStore('pagesNewsDetail');
           this.getNew(ID)
        },
        mounted() {

        },
        methods:{
            getNew(ID){
                getNewDetail({id:ID}).then(res=>{
                    if(res.success){
                        this.content=res.result.newsConten
                        this.title=res.result.newsTitle
                    }
                })
            },
            back(){
                this.$router.go(-1);//返回上一层
            },
        }
    }
</script>

<style scoped>
    @import 'less/detail.less';
</style>
